home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir36 / zipall12.zip / ZIPALL1.BAT < prev    next >
DOS Batch File  |  1993-09-15  |  2KB  |  56 lines

  1. @echo off
  2. REM
  3. REM ZIPALL1.BAT
  4. REM
  5. REM This BAT file can be executed from within any subdirectory to cause PKZIP
  6. REM to implode every file in the current directory BUT NOT THOSE IN ITS CHILD
  7. REM DIRECTORIES (if any) into a single file called ALLFILES.ZIP.  All the ori-
  8. REM ginal files are moved (-m) into the ZIP file, the affected directory is
  9. REM empty except for ALLFILES.ZIP.  Hidden and system files are zipped, also,
  10. REM and the file attributes for Hidden, System and Readonly files are retained. 
  11. REM Use the UNZIPALL.BAT file when necessary.  Use ZIPALL1T.BAT to accomplish the
  12. REM same feat while retaining the original files (copy instead of move).
  13. REM ALLFILES.ZIP should be unzipped with the "-Jhrs" switch if 
  14. REM PKUNZIP.EXE is used instead of UNZIPALL.BAT.
  15. REM
  16. if not exist allfiles.zip goto continue
  17. cls
  18. dir /w
  19. echo.
  20. echo This subdirectory already contains an ALLFILES.ZIP.  Delete it and use
  21. echo ZIPALL1 if you want to save changes made to the other files since it was
  22. echo last unzipped - OR - use RESTZIP if you want to restore the original
  23. echo ALLFILES.ZIP as the only file in the subdirectory.
  24. goto exit
  25. :continue
  26. if exist zipall1.usd del zipall1.usd
  27. pkzip allfiles *.* -ex -whs -Jhrs -m 
  28. if errorlevel 1 goto errexit
  29. attrib -h -s -r *.*
  30. pdel allfiles.zip /o /eq /ba /wh /nt  
  31. REM *****************  USER MUST EDIT THE FOLLOWING LINE ********************* 
  32. REM *****************  TO INDICATE WHERE ZIPALL1.USD IS !!!  *****************
  33. copy c:\pkware\zipall1.usd
  34. if not exist zipall1.usd goto usdexit
  35. dir
  36. echo.
  37. echo ZIPALL1.USD dummy file added to indicate ZIP of current subdirectory only.
  38. echo ALLFILES.ZIP has been successfully created, moving the original files.
  39. echo Child subdirectories, if any, are intact and have not been processed. 
  40. echo Use UNZIPALL.BAT to unzip, or PKUNZIP.EXE with the "-Jhrs" switch.            
  41. goto exit
  42. :usdexit
  43. echo Error in execution of ZIPALL1.BAT.
  44. echo DID YOU READ THE INSTALLATION INSTRUCTIONS?
  45. echo You must edit two lines in RESTZIP.BAT and one line in ZIPALL1.BAT to 
  46. echo change the hardcoded location of ZIPALL1.USD from "c:\pkware" to 
  47. echo wherever you decided to install these batch files (and ZIPALL1.USD).
  48. echo Just locate the string "c:\pkware" and edit appropriately.
  49. pause
  50. goto exit
  51. :errexit
  52. echo Error in execution of PKZIP (via ZIPALL1.BAT).
  53. :exit
  54. prompt $p$G
  55. echo on
  56.